package com.mini.spring.beanfactory.ac;

import java.util.Scanner;

/**
 * @author: 屠一乐
 * @date: 2023/8/24 18:30
 * @description:
 */
public class Main5017 {
    static int n;
    static int k;
    static int m;
    static int[] t = new int[10010];
    static int[] c = new int[10010];

    
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        n = scanner.nextInt();
        m = scanner.nextInt();
        k = scanner.nextInt();
        
        for (int i = 0; i < n; i++) {
            t[i] = scanner.nextInt();
            c[i] = scanner.nextInt();
        }
        int l=k,r=10010;
        while (l<r) {
            int mid=(l+r)/2;
            if(check(mid)) {
                r=mid;
            }
            else l=mid+1;
        }
        System.out.println(l);
    }
    public static  boolean check(int mid) {
        long res = m;
        for (int i = 0; i < n; i ++ ) {
            if (t[i] > mid) {
                res -= (long) (t[i] - mid) * c[i];
            }
        }
        return res >= 0;
    }

}
